---
title: "Figure 3"
output: html_document
date: "2025-05-06"
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

```{r}
library(ggthemes)
library(scales)
```



```{r}
all <- read.csv("Gov_funded.pats.csv")
```



```{r}

all$year <- as.numeric(all$patent_year)

all %>%
  #filter(year >= 1990) %>%
  ggplot(aes(x = year, y = y02_share, group = 1)) + 
  geom_line(size = 1.1) +
  scale_y_continuous(labels = scales::percent_format()) +
  scale_x_continuous(
    breaks = c(seq(1980, 2020, by = 10), 2024)  # manual breaks every 10 years + final year
  ) +
  theme_clean() +
  xlab("") + 
  ylab("% Y02 of all Publicly-Funded Patents") +
  theme(
    axis.title.y = element_text(size = 14, face = "bold"),
    axis.text.y = element_text(size = 12)
  )




ggsave("Percent_y02_1976_2024.png", width = 8, height = 8/1.618, units = "in")

```



